package com.fc.tms.constant.editor;

import java.beans.PropertyEditorSupport;

import com.fc.tms.constant.Team;

public class TeamEnumEditor extends PropertyEditorSupport {

    @Override
    public void setAsText(String text) throws IllegalArgumentException {
        text = text.trim();
        for (Team d : Team.values()) {
            if (d.name().equals(text)) {
                this.setValue(d);
                break;
            }
        }
    }
}